﻿@model IEnumerable<DA.Item>
@{
    ViewBag.Title = "Items";
    Layout = "~/Areas/OrdersStation/Views/Orders/_OrderLayout.cshtml";
}
@section pagescripts
{
    <script src="@Url.Resource("~/js/ItemOrders.js", "OrdersStation")"></script>
    <script>
        $(function () {
            ItemOrders.Init();
        });
    </script>
}
<h2>
    Items</h2>
<div>
    <ul class="itemList">
        @foreach (var item in Model)
        {
            <li><a href="#" data-id="@item.ItemId">@item.ItemName</a></li>
        }
    </ul>
</div>
<div id="itemEdit" style="display: none">
    <form method="post" action='@Url.Content("~/Orders/CreateItemInOrder/", "OrdersStation")' id="itemInOrderForm">
    @Html.ValidationSummary(true)
    @Html.Hidden("OrderId", ViewBag.OrderId as object)
    @Html.Hidden("ItemId")
    <div id="itemEditForm">
    </div>
    <p>
        <input type="submit" value="@Translator.Translate("item_in_order_submit")" />
    </p>
    </form>
</div>
